package com.lagou.util;

import javax.servlet.ServletRequest;

public class WebRequestHodler {
    private static ThreadLocal<ServletRequest> REQUEST_THREAD_LOCAL = new ThreadLocal<>();

    public static ServletRequest request() {
        return REQUEST_THREAD_LOCAL.get();
    }

    public static void setting(ServletRequest servletRequest) {
        REQUEST_THREAD_LOCAL.set(servletRequest);
    }

    public static void remove() {
        REQUEST_THREAD_LOCAL.remove();
    }

}
